gdk: Drop GDK_SURFACE_SUBSURFACE
authorMatthias Clasen <mclasen@redhat.com>
Sun, 19 Aug 2018 03:22:03 +0000 (03:22 +0000)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 19 Aug 2018 03:25:12 +0000 (23:25 -0400)
None of the backends supports this type anymore.

gdk/gdksurface.c
gdk/gdksurface.h

index 9b7b0a22287e9b23537b266688ec6663c67dee8e..286a5985c0431d3f33d86955802fbaa3680d4a83 100644 (file)
@@ -461,12 +461,6 @@ gdk_surface_get_property (GObject    *object,
     }
 }
 
-static gboolean
-gdk_surface_is_subsurface (GdkSurface *surface)
-{
-   return surface->surface_type == GDK_SURFACE_SUBSURFACE;
-}
-
 static GdkSurface *
 gdk_surface_get_impl_surface (GdkSurface *surface)
 {
@@ -555,10 +549,7 @@ recompute_visible_regions_internal (GdkSurface *private,
   old_abs_y = private->abs_y;
 
   /* Update absolute position */
-  if ((gdk_surface_has_impl (private) &&
-       private->surface_type != GDK_SURFACE_SUBSURFACE) ||
-      (gdk_surface_is_toplevel (private) &&
-       private->surface_type == GDK_SURFACE_SUBSURFACE))
+  if (gdk_surface_has_impl (private))
     {
       /* Native surfaces and toplevel subsurfaces start here */
       private->abs_x = 0;
@@ -677,15 +668,6 @@ gdk_surface_new (GdkDisplay    *display,
       if (parent != NULL)
         g_warning (G_STRLOC "Toplevel surfaces must be created without a parent");
       break;
-    case GDK_SURFACE_SUBSURFACE:
-#ifdef GDK_WINDOWING_WAYLAND
-      if (!GDK_IS_WAYLAND_DISPLAY (display))
-        {
-          g_warning (G_STRLOC "Subsurface surfaces can only be used on Wayland");
-          return NULL;
-        }
-#endif
-      break;
     case GDK_SURFACE_CHILD:
       break;
     default:
@@ -715,11 +697,6 @@ gdk_surface_new (GdkDisplay    *display,
       native = TRUE; /* Always use native surfaces for toplevels */
     }
 
-#ifdef GDK_WINDOWING_WAYLAND
-  if (surface->surface_type == GDK_SURFACE_SUBSURFACE)
-    native = TRUE; /* Always use native windows for subsurfaces as well */
-#endif
-
   if (native)
     {
       /* Create the impl */
@@ -922,7 +899,6 @@ _gdk_surface_destroy_hierarchy (GdkSurface *surface,
     case GDK_SURFACE_TOPLEVEL:
     case GDK_SURFACE_CHILD:
     case GDK_SURFACE_TEMP:
-    case GDK_SURFACE_SUBSURFACE:
       if (surface->parent)
         {
           if (surface->parent->children)
@@ -1173,10 +1149,7 @@ gdk_surface_get_parent (GdkSurface *surface)
 {
   g_return_val_if_fail (GDK_IS_SURFACE (surface), NULL);
 
-  if (gdk_surface_is_subsurface (surface))
-    return surface->transient_for;
-  else
-    return surface->parent;
+  return surface->parent;
 }
 
 /**
@@ -1196,8 +1169,7 @@ gdk_surface_get_toplevel (GdkSurface *surface)
 {
   g_return_val_if_fail (GDK_IS_SURFACE (surface), NULL);
 
-  while (surface->surface_type == GDK_SURFACE_CHILD ||
-         surface->surface_type == GDK_SURFACE_SUBSURFACE)
+  while (surface->surface_type == GDK_SURFACE_CHILD)
     {
       if (gdk_surface_is_toplevel (surface))
         break;
index b9d88690b5ebcd31ea01eebc30f28e16da220791..972c8a5fc98b347d57b2f81384cecf9d29eb3d49 100644 (file)
@@ -43,11 +43,7 @@ typedef struct _GdkGeometry          GdkGeometry;
  * GdkSurfaceType:
  * @GDK_SURFACE_TOPLEVEL: toplevel window (used to implement #GtkWindow)
  * @GDK_SURFACE_CHILD: child surface (used to implement e.g. #GtkEntry)
- * @GDK_SURFACE_TEMP: override redirect temporary surface (used to implement
- *  #GtkMenu)
- * @GDK_SURFACE_SUBSURFACE: subsurface; This surface is visually
- *  tied to a toplevel, and is moved/stacked with it. Currently this window
- *  type is only implemented in Wayland
+ * @GDK_SURFACE_TEMP: override redirect temporary surface (used to implement #GtkMenu)
  *
  * Describes the kind of surface.
  */
@@ -55,8 +51,7 @@ typedef enum
 {
   GDK_SURFACE_TOPLEVEL,
   GDK_SURFACE_CHILD,
-  GDK_SURFACE_TEMP,
-  GDK_SURFACE_SUBSURFACE
+  GDK_SURFACE_TEMP
 } GdkSurfaceType;
 
 /* Size restriction enumeration.